package com.biwin.common.app.enums;

import com.biwin.common.api.enums.IBwEnum;

/**
 * BSS - BiWin Spring Security
 *
 * @author biwin
 * @since 0.0.1
 */
public enum BwSecurityExceptionEnum implements IBwEnum {

    /**
     * 用户相关
     */
    USER_NOT_LOGIN("BSS0001", "用户未登录"),
    USER_ACCOUNT_EXPIRED("BSS0001", "账号已过期"),
    USER_CREDENTIALS_ERROR("BSS0001", "密码错误"),
    USER_CREDENTIALS_EXPIRED("BSS0001", "密码过期"),
    USER_ACCOUNT_DISABLE("BSS0001", "账号不可用"),
    USER_ACCOUNT_LOCKED("BSS0001", "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST("BSS0001", "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST("BSS0001", "账号已存在"),
    USER_ACCOUNT_USE_BY_OTHERS("BSS0001", "账号下线"),
    USER_FIRST_LOGIN_NEED_RESET_PASSWORD("BSS0001", "您首次认证系统，请修改密码后登录"),
    USER_LOGIN_SUCCESS("BSS0001", "登录成功"),
    NEW_AND_OLD_PASSWORD_CANNOT_EQ("BSS0001", "新密码不能与旧密码相同"),

    /**
     * 验证码相关
     */
    CAPTCHA_NOT_EXIST("SS0001", "验证码已失效，请刷新后再试"),
    CAPTCHA_ERROR("SS0001","验证码错误"),

    /**
     * 权限相关
     */
    NO_PERMISSIONS("401", "抱歉，您的权限不足"),
    ;

    private String code;

    private String value;

    BwSecurityExceptionEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public void setValue(String value) {
        this.value = value;
    }
}
